package net.tensor.skynet.api.service.user

import net.tensor.skynet.api.base.PageResult
import net.tensor.skynet.common.user.entity.User
import org.springframework.data.mongodb.core.query.Query

interface UserService {

    fun queryList(collectionName:String):Any

    fun queryListGet(collectionName:String):Any

    fun addOne(user: User):Any

    /**
     * 新增
     * @param student
     */
    fun saveUser(user: User?)

    /**
     * 删除
     * @param id
     */
    fun removeUser(id: Int?)

    /**
     * 修改
     * @param student
     */
    fun updateUser(user: User?)

    /**
     * 根据id查询
     * @param id
     * @return
     */
    fun findUserById(id: Long?): User?

    /**
     * 分页查询
     *
     * @param page
     * @param pageSize
     * @return
     */
    fun queryPage(pageSize: Int, pageNum: Int, query: Query): PageResult<User>
}